GtkStyle: Match "trough" and "slider" detail strings.
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 22 Oct 2010 21:59:58 +0000 (23:59 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:38:25 +0000 (15:38 +0100)
This is so scrollbars can be themed throught the "trough" and
"slider" classes.

gtk/gtkstyle.c

index 8ba9e975b267500dc06becd43bb230764d1cc6ee..c7ce8bbb2eae461128c3fca5a24cf29d777df97f 100644 (file)
@@ -1801,7 +1801,7 @@ transform_detail_string (const gchar     *detail,
   else if (strcmp (detail, "viewport") == 0 ||
           strcmp (detail, "viewportbin") == 0)
     gtk_style_context_add_class (context, "viewport");
-  else if (strcmp (detail, "trough") == 0)
+  else if (strncmp (detail, "trough", 6) == 0)
     {
       gtk_style_context_add_class (context, "scrollbar");
       gtk_style_context_add_class (context, "trough");
@@ -1820,6 +1820,8 @@ transform_detail_string (const gchar     *detail,
       gtk_style_context_add_class (context, "button");
       gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
     }
+  else if (strcmp (detail, "slider") == 0)
+    gtk_style_context_add_class (context, "slider");
   else if (g_str_has_prefix (detail, "cell_"))
     {
       GtkRegionFlags row, col;